home *** CD-ROM | disk | FTP | other *** search
- Path: logica.co.uk!usenet
- From: Kevin Thomas <thomask@logica.com>
- Newsgroups: comp.lang.c++,comp.os.ms-windows.programmer.tools.mfc
- Subject: Re: Getting functions out of libraries to work
- Date: Thu, 22 Feb 1996 17:34:26 +0000
- Organization: Logica UK Ltd.
- Message-ID: <312CA922.65CB@logica.com>
- References: <312BBC29.6772@uni.massey.ac.nz> <4ghlc2$f9o@news.dax.net>
- NNTP-Posting-Host: 158.234.77.222
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0GoldB1 (Win95; I)
-
- Nils Andreas Thommesen wrote:
- >
- > In article <312BBC29.6772@uni.massey.ac.nz>,
- > Nigel.Ramsay.1@massey.ac.nz wrote:
- > >Hi,
- > >
- > >I am trying to get some functions out of a library to work. The problem
- > >is that I keep getting an "unresolved external" error whenever I try to
- > >call the functions.
- > >
- > >The funny thing is that it works fine when I compile under just C.
- > >
- > >I am using Microsoft Visual C++ 1.0, running under Windows 95.
- > >
- > >Please help me.
- > >
- > >***** All email replies to: Nigel.Ramsay.1@uni.massey.ac.nz *****
- > > [not the reply-to address]
- > >Thanks,
- > >
- > >Nigel Ramsay.
- >
- > Are you linking the library implicitly or explicitly?
- > Implicit: just specify it in the Project-edit-dialog
- > Explicit: a lot more trouble, use LoadLibrary(), then follow the help-pages.
- >
- > "Unresolved external" means the compiler doesn't know about the function. Have
- > you included all the necessary headers?
- >
- > Nils Andreas Thommesen
- > - - - - - - - - - - - - - - - - -
- > Email: Nils.Thommesen@kvatro.no
- > Work : Kvatro-Notis, Pirsenteret, N-7005 Trondheim; +47 73 545 722
- > Home : E.B Schieldropsv. 9-24,7033 Trondheim,Norway; +47 73 8888 93
- > Fax : +47 73 545 750 | I'm left-handed, left-eyed,
- > WWW : http://www.kvatro.no/~nat | left-footed but not left
- > http://www.kvatro.no/notis | behind!Have you remembered to put the header files for the library functions
- inside an extern "C"?
-
- e.g. suppose your library functions are declared in "mylib.h":
-
- extern "C" {
- #include "mylib.h"
- }
-